﻿// Copyright (c)  MOKEYISH. All rights reserved.
// Licensed under the MIT License, See License.txt in the project root for license information.

namespace NSQL.Expressions.Functions
{
    public class ReplaceFunction : BaseExpression, IReplaceFunction
    {
        public IStringExpression Text { get; set; }
        public IConstantStringExpression OldValue { get; set; }
        public IConstantStringExpression NewValue { get; set; }

        public ReplaceFunction(IStringExpression text, IConstantStringExpression oldValue,
            IConstantStringExpression newValue)
        {
            Text = text;
            OldValue = oldValue;
            NewValue = newValue;
        }

        public override T Accept<T>(IExpressionVisitor<T> visitor) => visitor.Visit(this);
    }
}